#! /bin/bash




a=7;
b=18;

for exe in  1d-gs-lcs
do
    rm result/$exe.txt
    for index in `seq $a $b`;
    do 
    nx=$((2 ** $index))
    ../$exe/exe-$exe $nx $nx >> result/$exe.txt 
    done
done

echo -e "size\tscalar\tour\tspeedup" > result/$exe.data.txt
cat result/1d-gs-lcs.txt|tr "," "=" | awk -F "= " '{print $3 "\t" $NF}' | paste - - |awk '{print $1"\t" $2"\t" $4"\t"$4/$2}' >> result/$exe.data.txt
